package com.rahwi.rahwi_server.Controller;

import com.rahwi.rahwi_server.Service.impl.LoginService;
import com.rahwi.rahwi_server.vo.params.LoginParams;
import com.rahwi.rahwi_server.vo.params.RegisterParams;
import com.rahwi.rahwi_server.vo.results.ActionResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/register")
public class RegisterController {

    @Autowired
    LoginService loginService;

    @PostMapping("/user")
    public ActionResult register(@RequestBody RegisterParams registerParams){
        return loginService.register(registerParams);
    }
}
